import Vue from 'vue'
import Vuex from 'vuex'
// 依赖于state做计算得出结果
import getters from './getters'
// app模块
import app from './modules/app'
// setting模块
import settings from './modules/settings'
import permission from './modules/permission'
// user模块
import user from './modules/user'
// 使用vuex插件
Vue.use(Vuex)

// 实例化 挂载模块vuex，和全局的getters
const store = new Vuex.Store({
  modules: {
    app,
    settings,
    user,
    permission
  },
  getters
})

export default store
